home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>6.5. NL Filter</title>
- <link rel="stylesheet" href="gimp-help-plain.css" type="text/css" />
- <link rel="stylesheet" href="gimp-help-screen.css" type="text/css" />
- <meta name="generator" content="DocBook XSL Stylesheets V1.66.1" />
- <link rel="start" href="index.html" title="GIMP User Manual" />
- <link rel="up" href="ch06s06.html" title="6. Enhance filters" />
- <link rel="prev" href="ch06s06s04.html" title="6.4. Destripe" />
- <link rel="next" href="ch06s06s06.html" title="6.6. Sharpen" />
- </head>
- <body>
- <div xmlns="" class="navheader">
- <table width="100%" summary="Navigation header">
- <tr>
- <th colspan="3" align="center" id="chaptername">6. Enhance filters</th>
- </tr>
- <tr>
- <td width="20%" align="left"><a accesskey="p" href="ch06s06s04.html">Prev</a> </td>
- <th width="60%" align="center" id="sectionname">6.5. NL Filter</th>
- <td width="20%" align="right"> <a accesskey="n" href="ch06s06s06.html">Next</a></td>
- </tr>
- </table>
- <hr />
- </div>
- <div class="sect2" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h3 class="title"><a id="plug-in-nlfilt"></a>6.5. NL Filter</h3>
- </div>
- </div>
- </div>
- <a id="id3478992" class="indexterm"></a>
- <div class="mediaobject">
- <img src="../images/filters/filters-enhance-nlfilter.png" />
- </div>
- <div class="simplesect" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="id3479014"></a>Overview</h4>
- </div>
- </div>
- </div>
- <p>
- This filter is found in
- <span class="guimenu">Filters</span>-><span class="guisubmenu">Enhance</span>-><span class="guimenuitem"><span class="accel">N</span>L Filter</span>.
- NL means "Non Linear". Derived
- from the Unix <span><b class="command">pnmnlfilt</b></span> program, it joins
- smoothing, despeckle and sharpen enhancement functions. It works
- on the whole image, not on the selection.
- </p>
- <p>
- This is something of a swiss army knife filter. It has 3 distinct
- operating modes. In all of the modes each pixel in the image is
- examined and processed according to it and its surrounding pixels
- values. Rather than using the 9 pixels in a 3x3 block, 7 hexagonal
- area samples are taken, the size of the hexagons being controlled
- by the radius parameter. A radius value of 0.3333 means that the 7
- hexagons exactly fit into the center pixel (ie. there will be no
- filtering effect). A radius value of 1.0 means that the 7 hexagons
- exactly fit a 3x3 pixel array.
- </p>
- </div>
- <div class="simplesect" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="id3479072"></a>Options</h4>
- </div>
- </div>
- </div>
- <div class="variablelist">
- <dl>
- <dt>
- <span class="term">Preview</span>
- </dt>
- <dd>
- <p>
- When <span class="guilabel">Do preview</span> is checked, parameter
- setting results are interactively displayed in preview.
- </p>
- </dd>
- <dt>
- <span class="term">Parameter settings</span>
- </dt>
- <dd>
- <p>
- </p>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- <span class="guilabel">Alpha</span>: Meaning of this value
- depends on the selected option.
- </p>
- </li>
- <li>
- <p>
- <span class="guilabel">Radius</span>:
- Controls the strength of the filter (0.33-1.00).
- </p>
- </li>
- </ul>
- </div>
- <p>
- </p>
- </dd>
- </dl>
- </div>
- </div>
- <div class="simplesect" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="id3479142"></a>Operating Modes</h4>
- </div>
- </div>
- </div>
- <p>
- This filter can perform several distinct functions, depending on
- the value of the parameter <i class="parameter"><tt>alpha</tt></i>.
- </p>
- <div class="variablelist">
- <dl>
- <dt>
- <span class="term">Alpha trimmed mean filter. (0.0 <=
- <i class="parameter"><tt>alpha</tt></i> <= 0.5)</span>
- </dt>
- <dd>
- <p>
- The value of the center pixel will be replaced by the mean of
- the 7 hexagon values, but the 7 values are sorted by size and
- the top and bottom <i class="parameter"><tt>alpha</tt></i> portion of the 7
- are excluded from the mean. This implies that an
- <i class="parameter"><tt>alpha</tt></i> value of 0.0 gives the same sort of
- output as a normal convolution (ie. averaging or smoothing
- filter), where <i class="parameter"><tt>radius</tt></i> will determine the
- "strength" of the filter. A good value to start from for subtle
- filtering is <i class="parameter"><tt>alpha</tt></i> = 0.0,
- <i class="parameter"><tt>radius</tt></i> = 0.55. For a more blatant
- effect, try <i class="parameter"><tt>alpha</tt></i> 0.0 and
- <i class="parameter"><tt>radius</tt></i> 1.0.
- </p>
- <p>
- An <i class="parameter"><tt>alpha</tt></i> value of 0.5 will cause the
- median value of the 7 hexagons to be used to replace the center
- pixel value. This sort of filter is good for eliminating "pop"
- or single pixel noise from an image without spreading the noise
- out or smudging features on the image. Judicious use of the
- <i class="parameter"><tt>radius</tt></i> parameter will fine tune the
- filtering. Intermediate values of <i class="parameter"><tt>alpha</tt></i>
- give effects somewhere between smoothing and "pop" noise
- reduction. For subtle filtering try starting with values of
- <i class="parameter"><tt>alpha</tt></i> = 0.4,
- <i class="parameter"><tt>radius</tt></i> = 0.6. For a more blatant effect
- try <i class="parameter"><tt>alpha</tt></i> = 0.5,
- <i class="parameter"><tt>radius</tt></i> = 1.0 .
- </p>
- </dd>
- <dt>
- <span class="term">Optimal estimation smoothing. (1.0 <=
- <i class="parameter"><tt>alpha</tt></i> <= 2.0)</span>
- </dt>
- <dd>
- <p>
- This type of filter applies a smoothing filter adaptively over
- the image. For each pixel the variance of the surrounding
- hexagon values is calculated, and the amount of smoothing is
- made inversely proportional to it. The idea is that if the
- variance is small then it is due to noise in the image, while if
- the variance is large, it is because of "wanted" image features.
- As usual the <i class="parameter"><tt>radius</tt></i> parameter controls
- the effective radius, but it probably advisable to leave the
- radius between 0.8 and 1.0 for the variance calculation to be
- meaningful. The <i class="parameter"><tt>alpha</tt></i> parameter sets the
- noise threshold, over which less smoothing will be done. This
- means that small values of <i class="parameter"><tt>alpha</tt></i> will
- give the most subtle filtering effect, while large values will
- tend to smooth all parts of the image. You could start with
- values like
- <tt class="code">
- <i class="parameter"><tt>alpha</tt></i> = 1.2
- </tt>,
- <tt class="code">
- <i class="parameter"><tt>radius</tt></i> = 1.0
- </tt>,
- and try increasing or decreasing the
- <i class="parameter"><tt>alpha</tt></i> parameter to get the desired
- effect. This type of filter is best for filtering out dithering
- noise in both bitmap and color images.
- </p>
- </dd>
- <dt>
- <span class="term">Edge enhancement. (-0.1 >= <i class="parameter"><tt>alpha</tt></i> >=
- -0.9)</span>
- </dt>
- <dd>
- <p>
- This is the opposite type of filter to the smoothing filter. It
- enhances edges. The <i class="parameter"><tt>alpha</tt></i> parameter
- controls the amount of edge enhancement, from subtle (-0.1) to
- blatant (-0.9). The <i class="parameter"><tt>radius</tt></i> parameter
- controls the effective radius as usual, but useful values are
- between 0.5 and 0.9. Try starting with values of
- <tt class="code">
- <i class="parameter"><tt>alpha</tt></i> = 0.3
- </tt>,
- <tt class="code">
- <i class="parameter"><tt>radius</tt></i> = 0.8
- </tt>.
- </p>
- </dd>
- <dt>
- <span class="term">Combination use</span>
- </dt>
- <dd>
- <p>
- The various operating modes can be used one after the other to
- get the desired result. For instance to turn a monochrome
- dithered image into grayscale image you could try one or two
- passes of the smoothing filter, followed by a pass of the
- optimal estimation filter, then some subtle edge enhancement.
- Note that using edge enhancement is only likely to be useful
- after one of the non-linear filters (alpha trimmed mean or
- optimal estimation filter), as edge enhancement is the direct
- opposite of smoothing.
- </p>
- <p>
- For reducing color quantization noise in images (ie. turning
- .gif files back into 24 bit files) you could try a pass of the
- optimal estimation filter (<i class="parameter"><tt>alpha</tt></i> 1.2,
- <i class="parameter"><tt>radius</tt></i> 1.0), a pass of the median filter
- (<i class="parameter"><tt>alpha</tt></i> 0.5, <i class="parameter"><tt>radius</tt></i>
- 0.55), and possibly a pass of the edge enhancement filter.
- Several passes of the optimal estimation filter with declining
- <i class="parameter"><tt>alpha</tt></i> values are more effective than a
- single pass with a large <i class="parameter"><tt>alpha</tt></i> value. As
- usual, there is a tradeoff between filtering effectiveness and
- losing detail. Experimentation is encouraged.
- </p>
- </dd>
- </dl>
- </div>
- </div>
- </div>
- <div class="navfooter">
- <hr />
- <table width="100%" summary="Navigation footer">
- <tr>
- <td width="40%" align="left"><a accesskey="p" href="ch06s06s04.html">Prev</a> </td>
- <td width="20%" align="center">
- <a accesskey="u" href="ch06s06.html">Up</a>
- </td>
- <td width="40%" align="right"> <a accesskey="n" href="ch06s06s06.html">Next</a></td>
- </tr>
- <tr>
- <td width="40%" align="left" valign="top">6.4. Destripe </td>
- <td width="20%" align="center">
- <a accesskey="h" href="index.html">Home</a>
- </td>
- <td width="40%" align="right" valign="top"> 6.6. Sharpen</td>
- </tr>
- </table>
- </div>
- </body>
- </html>
-